package edu.hziee.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import edu.hziee.mapper.StudentMapper;
import edu.hziee.mapper.TeacherMapper;
import edu.hziee.models.Student;
import edu.hziee.models.Teacher;

@Repository
public class TeacherDao {

	@Autowired
	TeacherMapper teachermapper;
	
	public List<Teacher> findAll(){
		return teachermapper.findAll();
	}
	
	public Teacher findById(int tid){
		return teachermapper.findById(tid);
	}
	
	public void addTeacher(Teacher teacher){
		teachermapper.addTeacher(teacher);
	}
	
	public void modify(Teacher teacher){
		teachermapper.modify(teacher);
	}
	
	public void delete(int id){
		teachermapper.delete(id);
	}
}
